const { Switch } = require("../lib/types");

module.exports = {
    name: "ngx_stream_proxy_module",
    map: {
        proxy_bind: [[Switch, String], , ["stream", "server"]],
        proxy_buffer_size: [String, "16k", ["stream", "server"]],
        proxy_connect_timeout: [String, "60s", ["stream", "server"]],
        proxy_download_rate: [String, "0", ["stream", "server"]],
        proxy_half_close: [Switch, false, ["stream", "server"]],
        proxy_next_upstream: [Switch, true, ["stream", "server"]],
        proxy_next_upstream_timeout: [String, "0", ["stream", "server"]],
        proxy_next_upstream_tries: [Number, 0, ["stream", "server"]],
        proxy_pass: [String, , "server"],
        proxy_protocol: [Switch, false, ["stream", "server"]],
        proxy_requests: [Number, 0, ["stream", "server"]],
        proxy_responses: [Number, , ["stream", "server"]],
        proxy_session_drop: [Switch, false, ["stream", "server"]],
        proxy_socket_keepalive: [Switch, false, ["stream", "server"]],
        proxy_ssl: [Switch, false, ["stream", "server"]],
        proxy_ssl_certificate: [String, , ["stream", "server"]],
        proxy_ssl_certificate_key: [String, , ["stream", "server"]],
        proxy_ssl_certificate_key: [String, , ["stream", "server"]],
        proxy_ssl_ciphers: [String, "DEFAULT", ["stream", "server"]],
        proxy_ssl_conf_command: [String, , ["stream", "server"]],
        proxy_ssl_crl: [String, , ["stream", "server"]],
        proxy_ssl_name: [String, , ["stream", "server"]],
        proxy_ssl_password_file: [String, , ["stream", "server"]],
        proxy_ssl_protocols: [String, "TLSv1 TLSv1.1 TLSv1.2", ["stream", "server"]],
        proxy_ssl_server_name: [Switch, false, ["stream", "server"]],
        proxy_ssl_session_reuse: [Switch, true, ["stream", "server"]],
        proxy_ssl_trusted_certificate: [String, , ["stream", "server"]],
        proxy_ssl_verify: [Switch, false, ["stream", "server"]],
        proxy_ssl_verify_depth: [Number, 1, ["stream", "server"]],
        proxy_timeout: [String, "10m", ["stream", "server"]],
        proxy_upload_rate: [String, "0", ["stream", "server"]],
    }
};